
from flask_login import  login_user,current_user
from flask import url_for,redirect

def checkloing():
 if current_user.is_authenticated:
     return redirect(url_for('index'))
 else:
     return redirect(url_for('login'))